public class HTMLCreator {

	/**
	 * Tämän metodin pitäisi generoida HTML-sivu String merkkijonoon ja
	 * palauttaa se. Oikeisiin kohtiin pitäisi lisätä parametrina saatu
	 * javascript ja tiedoston nimi.
	 * http://www.htmlescape.net/javaescape_tool.html
	 * 
	 * @param javaScript
	 * @param filename
	 * @return
	 */
	public static String create(String javaScript, String filename, String credits) {
		
		//By Esko & Kalle
		String palautus = "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.1//EN\" \"xhtml11.dtd\">\n<html>\n    <head>\n        <title>Image Info : " + filename + "</title>\n        <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\n        <script type=\"text/javascript\" src=\"http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js\"></script>\n        <script type=\"text/javascript\" src=\"js/highcharts.js\"></script>\n        <script type=\"text/javascript\">\n"+ javaScript + "\n</script>\n    </head>\n    <body>\n        <div style=\"width: 960px; margin-right: auto; margin-left: auto; \">\n            <div style=\"text-align: center\">\n                <h1>Image info: test.jpg</h1>\n                <img alt=\"filename\" src=\""+ filename + "\" style=\"width: 800px; margin-right: auto; margin-left: auto;\">\n            </div>\n            <div id=\"container\" style=\"height:400px;  width: 800px; margin-right: auto; margin-left: auto;\"></div>\n        <div>"+credits+"</div></div>\n    </body>\n</html>";

		return palautus;
	}

}
